package com.cityfood.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cityfood.mapper.CfShopMapper;
import com.cityfood.pojo.CfShop;
import com.cityfood.service.ShopService;

@Service
public class ShopServiceImpl implements ShopService {

	@Autowired
	private CfShopMapper mapper;
	
	@Override
	public List<CfShop> getShopList() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public CfShop getShopByShopId(Integer id) {
		CfShop cfShop = mapper.selectByPrimaryKey(id);
		return cfShop;
	}

	@Override
	public int saveShop(CfShop shop) {
		shop.setCreateTime(new Date());
		int i = mapper.insertSelective(shop);
		return i;
	}

}
